/*
 * @Author: wuyuxin
 * @Date: 2022-01-09 16:56:36
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-01-10 11:47:20
 * @Description: 
 */
import logo from './logo.svg';
import './App.css';
import { BrowserRouter, Route, Link, Routes } from 'react-router-dom'
function App() {
  return (
    <BrowserRouter basename='/react'>
      <Link to="/">首页</Link>
      <Link to='/about'>关于页面</Link>
      <Routes>
        <Route path="/" exact element={() => {
          <div className="App">
            <header className="App-header">
              <img src={logo} className="App-logo" alt="logo" />
              <p>
                Edit <code>src/App.js</code> and save to reload.
              </p>
              <a
                className="App-link"
                href="https://reactjs.org"
                target="_blank"
                rel="noopener noreferrer"
              >
                Learn React
              </a>
            </header>
          </div>
        }}></Route>
        <Route path="/about" element={
          () => {
            <h1>about页面</h1>
          }
        }></Route>
      </Routes>
    </BrowserRouter>
  );
}

export default App;
